package com.myproject.mall.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.myproject.mall.domain.enums.AnnouncementStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@TableName("scmall_announcement")
@Schema(description = "公告")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Announcement {
    @Schema(description = "公告主键")
    @TableId(value = "announcement_id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "公告内容")
    @TableField(value = "annoucement_content")
    private String content;

    @Schema(description = "公告标题")
    @TableField(value = "announcement_title")
    private String title;

    @Schema(description = "公告发布者")
    @TableField(value = "announcement_user_id")
    private String userId;

    @Schema(description = "公告状态")
    @TableField(value = "announcement_status")
    private AnnouncementStatus status;

    @Schema(description = "公告创立时间")
    @TableField(value = "announcement_create_time")
    private LocalDateTime createTime;

    @Schema(description = "公告最新更新时间")
    @TableField(value = "announcement_update_time")
    private LocalDateTime updateTime;

}
